package com.cdut.hwadeefsc.service.impl;

import com.cdut.hwadeefsc.entity.attendance;
import com.cdut.hwadeefsc.mapper.attendanceMapper;
import com.cdut.hwadeefsc.service.attendanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class attendanceServiceImpl implements attendanceService {

    @Autowired
    private attendanceMapper attendanceMapper;

    @Override
    public List<attendance> getStudentAttendance(Integer studentId) {
        return attendanceMapper.findByStudentId(studentId);
    }

    @Override
    public boolean addAttendance(attendance attendance) {
        return attendanceMapper.insert(attendance) > 0;
    }
}




